package com.example.idachuappone.person.item;

import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.example.idachuappone.BaseActivity;
import com.example.idachuappone.R;
import com.example.idachuappone.index.ui.MyListView;
import com.example.idachuappone.person.adapter.HelpAdapter;
import com.example.idachuappone.person.entity.Help;
import com.lidroid.xutils.bitmap.BitmapGlobalConfig.BitmapCacheManagementTask;

public class HelpActivity extends BaseActivity implements OnClickListener {
	private HelpAdapter adapter;
	private Button btn_back;
	private boolean isselect;
	private List<Help> listHelps;
	private MyListView listView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_help);
		this.isselect = getIntent().getBooleanExtra("isselect", false);
		initView();
	}

	private void initView() {
		this.btn_back = (Button) findViewById(R.id.btn_back);
		this.btn_back.setOnClickListener(this);
		this.listView = (MyListView) findViewById(R.id.listView1);
		this.adapter = new HelpAdapter(this);
		this.listView.setAdapter(this.adapter);
		initData();
		initAdapter();
		if (this.isselect) {
			this.listView.setSelection(BitmapCacheManagementTask.MESSAGE_CLEAR_DISK);
		}
	}

	private void initData() {
		Help help1 = new Help(
				"69\u300199\u5143\u90fd\u662f\u4ec0\u4e48\u8d39\u7528\uff0c\u5305\u62ec\u98df\u6750\u5417\uff1f",
				"69\u300199\u5143\u662f\u53a8\u5e08\u7684\u670d\u52a1\u8d39\u7528\uff0c\u5e76\u4e0d\u5305\u542b\u98df\u6750\uff0c\u98df\u6750\u8d39\u7528\u9700\u8981\u60a8\u81ea\u5df1\u627f\u62c5\u3002\u5982\u679c\u589e\u52a0\u83dc\u5355\uff0c\u6bcf\u9053\u83dc\u9700\u8981\u989d\u5916\u6536\u8d3915\u5143\u3002\u70f9\u996a\u7ed3\u675f\u540e\uff0c\u4ed8\u7ed9\u5927\u53a8\u5373\u53ef\u3002");
		Help help2 = new Help(
				"\u6211\u9700\u8981\u63d0\u524d\u591a\u957f\u65f6\u95f4\u9884\u8ba2\uff1f",
				"\u60a8\u9700\u8981\u81f3\u5c11\u63d0\u524d\u56db\u4e2a\u5c0f\u65f6\u9884\u8ba2\u5927\u53a8\uff0c\u65b9\u4fbf\u6211\u4eec\u7ed9\u60a8\u5b89\u6392\u5408\u9002\u7684\u53a8\u5e08\u3002");
		Help help3 = new Help(
				"\u6211\u4e0d\u77e5\u9053\u5403\u4ec0\u4e48\uff0c\u53ef\u5426\u8ba9\u53a8\u5e08\u4ee3\u4e70\u98df\u6750\uff1f",
				"\u60a8\u53ef\u4ee5\u8bf7\u5927\u53a8\u4ee3\u4e70\u98df\u6750\uff0c\u5927\u53a8\u4e0a\u95e8\u540e\u51ed\u5c0f\u7968\u627e\u60a8\u62a5\u9500\u3002");
		Help help4 = new Help(
				"\u6211\u591a\u4e45\u53ef\u4ee5\u5403\u5230\uff1f",
				"\u56db\u83dc\u4f1a\u57282\u5c0f\u65f6\u5185\u5b8c\u6210\uff0c\u516d\u83dc\u9700\u89812-3\u5c0f\u65f6\u3002\u5982\u6709\u7279\u6b8a\u83dc\u54c1\uff0c\u70f9\u996a\u65f6\u95f4\u4f1a\u6709\u6240\u5ef6\u957f\u3002");
		Help help5 = new Help(
				"\u6211\u60f3\u4fee\u6539\u8ba2\u5355\uff0c\u600e\u4e48\u529e\uff1f",
				"\u60a8\u4e0b\u5355\u540e\u5ba2\u670d\u4f1a\u4e0e\u60a8\u7535\u8bdd\u786e\u8ba4\uff0c\u60a8\u53ef\u4ee5\u5728\u7535\u8bdd\u4e2d\u8bf4\u660e\u3002\u60a8\u4e5f\u53ef\u4ee5\u81f4\u7535\u7231\u5927\u53a8\u7684\u5ba2\u670d\u7535\u8bdd\uff0c400-680-2959\u3002");
		Help help6 = new Help(
				"\u6211\u8981\u53d6\u6d88\u8ba2\u5355\uff1f",
				"\u8bf7\u60a8\u81f3\u5c11\u63d0\u524d\u56db\u5c0f\u65f6\u901a\u77e5\u6211\u4eec\uff0c\u60a8\u53ef\u4ee5\u5728\u4e2a\u4eba\u4e2d\u5fc3-\u8ba2\u5355\u8be6\u60c5\u53d6\u6d88\u8ba2\u5355\uff0c\u4e5f\u53ef\u4ee5\u81f4\u7535\u7231\u5927\u53a8\u7684\u5ba2\u670d\u7535\u8bdd\uff0c400-680-2959\u3002");
		Help help7 = new Help(
				"\u6211\u7684\u9000\u6b3e\uff1f",
				"\u53d6\u6d88\u8ba2\u5355\u7684\u8ba2\u91d1\uff0c\u5c06\u57283\u4e2a\u5de5\u4f5c\u5185\u5b8c\u6210\u9000\u6b3e\uff0c\u5230\u60a8\u7684\u652f\u4ed8\u5e10\u53f7\u5185\uff1b\u63d0\u524d\u9884\u8ba2\u65f6\u95f44\u5c0f\u65f6\u53d6\u6d88\u8ba2\u5355\uff0c\u5c06\u5168\u989d\u9000\u8fd8\u60a8\u7684\u8ba2\u91d1\u3002\u5728\u9884\u8ba2\u65f6\u95f4\u524d4\u5c0f\u65f6\u5185\u53d6\u6d88\u8ba2\u5355\uff0c\u8ba2\u91d1\u5c06\u652f\u4ed8\u7ed9\u53a8\u5e08\uff0c\u4e0d\u518d\u9000\u8fd8\u3002");
		Help help8 = new Help(
				"\u6211\u4e0d\u6ee1\u610f\u600e\u4e48\u529e\uff1f",
				"\u7231\u5927\u53a8\u81f4\u529b\u4e8e\u4e3a\u60a8\u63d0\u4f9b\u5b8c\u7f8e\u7684\u7f8e\u98df\u4f53\u9a8c\uff0c\u5982\u679c\u6709\u62db\u5f85\u4e0d\u5468\u7684\u5730\u65b9\uff0c\u7231\u5927\u53a8\u4e00\u5b9a\u5411\u60a8\u9053\u6b49\uff0c\u4e3a\u60a8\u5168\u989d\u9000\u6b3e\uff0c\u5e76\u5e0c\u671b\u6709\u673a\u4f1a\u80fd\u518d\u6b21\u4e3a\u60a8\u63d0\u4f9b\u670d\u52a1\u3002");
		Help help9 = new Help(
				"\u5927\u53a8\u4f1a\u5e2e\u6211\u6536\u62fe\u53a8\u623f\u5417\uff1f",
				"\u662f\u7684\uff01\u6211\u4eec\u7684\u5927\u53a8\u90fd\u662f\u4e13\u4e1a\u7ea7\u53a8\u5e08\uff0c\u70f9\u996a\u7684\u540c\u65f6\u6536\u62fe\u201c\u53f0\u9762\u201d\u662f\u57fa\u672c\u529f\uff0c\u8bf7\u60a8\u653e\u5fc3\u3002");
		Help help10 = new Help(
				"\u4ec0\u4e48\u662f\u4f18\u60e0\u5238\uff1f",
				"\u4f18\u60e0\u5238\u662f\u7231\u5927\u53a8\u53d1\u884c\u548c\u8ba4\u53ef\u7684\uff0c\u53ef\u4ee5\u5728\u7231\u5927\u53a8\u7f51\u7ad9\u548c\u624b\u673a\u7aef\u6d88\u8d39\u4ed8\u6b3e\u65f6\u62b5\u6263\u76f8\u5e94\u9762\u503c\u7684\u91d1\u989d\u3002");
		Help help11 = new Help(
				"\u5982\u4f55\u83b7\u53d6\u4f18\u60e0\u5238\uff1f",
				"\u7231\u5927\u53a8\u624b\u673a\u5ba2\u6237\u7aef\u548c\u7f51\u7ad9\u4f1a\u4e0d\u5b9a\u671f\u63a8\u51fa\u6d3b\u52a8\uff0c\u624b\u673a\u7528\u6237\u53ef\u4ee5\u6253\u5f00\u7231\u5927\u53a8\u624b\u673a\u5ba2\u6237\u7aef\uff0c\u67e5\u770b\u5f39\u51fa\u7684\u6d3b\u52a8\u901a\u77e5\uff0c\u9886\u53d6\u4f18\u60e0\u5238\uff0c\u673a\u4f1a\u4e0d\u5bb9\u9519\u8fc7\uff01");
		Help help12 = new Help(
				"\u5982\u4f55\u4f7f\u7528\u4f18\u60e0\u5238\uff1f",
				"\u5728\u7f51\u7ad9\u548c\u624b\u673a\u7aef\u4ed8\u6b3e\u65f6\uff0c\u90fd\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528\u4f18\u60e0\u5238\u6216\u8f93\u5165\u4f18\u60e0\u7801\uff0c\u9a8c\u8bc1\u901a\u8fc7\u540e\uff0c\u62b5\u6263\u76f8\u5e94\u7684\u91d1\u989d\u3002");
		Help help13 = new Help(
				"\u4f18\u60e0\u5238\u627e\u96f6\u5151\u73b0\u5417\uff1f",
				"\u4f18\u60e0\u5238\u4e0d\u627e\u96f6\uff0c\u4e0d\u5151\u73b0\u3002\u4ed8\u6b3e\u65f6\u4f18\u60e0\u5238\u4f1a\u88ab\u4f18\u5148\u4f7f\u7528\uff0c\u62b5\u6263\u90e8\u5206\u91d1\u989d\u3002");
		this.listHelps = new ArrayList();
		this.listHelps.add(help1);
		this.listHelps.add(help2);
		this.listHelps.add(help3);
		this.listHelps.add(help4);
		this.listHelps.add(help5);
		this.listHelps.add(help6);
		this.listHelps.add(help7);
		this.listHelps.add(help8);
		this.listHelps.add(help9);
		this.listHelps.add(help10);
		this.listHelps.add(help11);
		this.listHelps.add(help12);
		this.listHelps.add(help13);
	}

	private void initAdapter() {
		this.adapter.setList(this.listHelps);
		this.adapter.notifyDataSetChanged();
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_back /* 2131165198 */:
			finish();
		default:
		}
	}
}
